package com.fx.edustatistics.controller;


import com.fx.commonuntils.ReturnMessage;
import com.fx.edustatistics.service.StatisticsDailyService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 网站统计日数据 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-11-20
 */
@RestController
@RequestMapping("/edustatistics/statistics-daily")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@Slf4j
@CrossOrigin//解决跨域问题
public class StatisticsDailyController {

   final private StatisticsDailyService staService;

    //统计某一天注册人数,生成统计数据
    @PostMapping("registerCount/{day}")
    public ReturnMessage<Object> registerCount(@PathVariable String day) {

        return staService.registerCount(day);
    }











}

